<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
{eval $user=$this->user; $setting=$this->setting;}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Manyou's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset={MY_CHARSET}">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jqueryui.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#list").sortable({
		update: function(){
			var reorderid="";
			var numValue=$("input[name='order[]']");
			for(var i=0;i<numValue.length;i++){
				reorderid+=$(numValue[i]).val()+",";
			}
			var hiddencid=$("input[name='hiddencid']").val();
			$.post("index.php?admin_category/reorder{$setting['seo_suffix']}",{order:reorderid,hiddencid:hiddencid});
		}
	});
});
</script>
</head>
<body>

<div class="container">
	<!--{if isset($message)}-->
		<!--{eval $type=isset($type)?$type:'correctmsg'; }-->
		<div class="{$type}"><p>{$message}</p></div>
	<!--{/if}-->
	<h3 class="marginbot">同业分类管理<a class="sgbtn" href="index.php?admin_category{$setting['seo_suffix']}">同业分类管理</a><a class="sgbtn" href="index.php?admin_category/syscate/new{$setting['seo_suffix']}">系统分类管理</a></h3>
		

		<div class="mainbox nomargin">
		<form name="askform" action="index.php?admin_category/add{$setting['seo_suffix']}" method="post">
			<table class="opt">
				<tr>
					<th colspan="2">上一级分类:{$category_js}(每个分类名占一行)</th>
				</tr>
				<tr>
					<td><textarea class="area" name="categorys"  style="height:60px;width:280px;" ></textarea></td>
					<td valign="top"><input type="hidden" value="0" name="cid">
				<input class="btn" tabindex="3" type="submit" value=" 提 交 " name="submit"></td>
				</tr>
			</table>
		</form>
	</div>
	<div id="path"><a href="index.php?admin_category/default{$setting['seo_suffix']}">根目录</a>
		{if isset($navlist)}
			<!--{loop $navlist $nav}-->
				 &gt;&gt; <a href="index.php?admin_category/view/$nav['id']{$setting['seo_suffix']}">{$nav['name']}</a>  
			 <!--{/loop}-->
		{/if}
			 {if isset($category['name'])}&gt;&gt; {$category['name']}{/if}
		</div>
	<div class="mainbox">
			<form name="answerlist" onsubmit="return confirm('删除该分类会同时删除该分类下的子分类及其分类下的所有问题，确定继续?');" action="index.php?admin_category/remove{$setting['seo_suffix']}" method="post">
			<table width="80%" cellspacing="0" cellpadding="3" class="list">
				<tr align="center" class="list_title">
					<th width="15%" align="left"><input class="checkbox" id="chkall" onclick="checkall('cid[]')" type="checkbox" name="chkall"><label for="chkall">全选</label></th>					
					<th width="30%" align="center"><strong>分类名称</strong></th>
						<th  width="20%" align="center"><strong>查看子分类</strong></th>
						<th  width="20%" align="center"><strong>添加子分类</strong></th>
					<th  width="15%" align="center"><strong>编辑</strong></th>
				</tr>    
			</table>
			    <input type="hidden" name="hiddencid" value="{$pid}" />
				<ul id="list" style="cursor: hand; cursor: pointer;" >
					{loop $categorylist $cate}
					<li style="list-style:none;">
						<table width="80%"  class="list" id="table1">
							<tr style="background:#f7f7f7">
								<td width="15%"><input class="checkbox" type="checkbox" value="{$cate['id']}" name="cid[]"></td>
								<td width="30%" ><a href="index.php?admin_category/view/$cate['id']{$setting['seo_suffix']}"><input name="order[]" type="hidden" value="{$cate['id']}"/><strong>{$cate['name']}</strong></a></td>

								<td width="20%" align="center"><a href="index.php?admin_category/view/$cate['id']{$setting['seo_suffix']}"><img src="{SITE_URL}css/common/admin/view.png"></a></td>
								<td width="20%" align="center"><a href="index.php?admin_category/add/$cate['id']/$cate['pid']{$setting['seo_suffix']}"><img src="{SITE_URL}css/common/admin/add.png"></a></td>
							
								<td width="15%" align="center"><a href="index.php?admin_category/edit/$cate['id']{$setting['seo_suffix']}"><img src="{SITE_URL}css/common/admin/edit.png"></a></td>
							</tr>
						</table>
					</li>
					{/loop}
				</ul>
				<table width="80%" cellspacing="0" cellpadding="3">
				<tr class="nobg"><td><input class="btn" type="submit" name="submit" value="删&nbsp;除" /></td></tr>
				</table>
			</form>
	</div>
</div>
</body>
</html>